<template>
	<view class="" v-for="k in items">
		<tableData>
			<template v-slot:one>
				<van-checkbox v-model="k.flag" shape="square" icon-size="14px">{{ k.lanName }}</van-checkbox>
				<van-icon :name="check ? 'arrow-down' : 'arrow-up'" @click="check = !check" />
			</template>
			<template v-slot:two>
				<van-button type="primary" size="mini" @click="addColumn">增加页面</van-button>
			</template>
			<template v-slot:three>
				<!-- <text>甲方问题</text> -->
			</template>
			<template v-slot:four>
				<!-- <text>工作组问题</text> -->
			</template>
		</tableData>
		<tablePage v-if="check" v-for="i in k.page" :items="i.item" :name="i.name" :flag="i.flag" />
		<tableData>
			<template v-slot:one>
				<van-button type="primary" size="small">增加栏目</van-button>
			</template>
			<template v-slot:two>
				<van-button type="primary" size="small">增加问题</van-button>
			</template>
			<template v-slot:three>
				<view class="flex" v-for="i in btnlist">
					<van-button type="primary" size="small">{{ i }}</van-button>
				</view>
			</template>
		</tableData>
	</view>
</template>

<script setup lang="ts">
import tableData from './tableData.vue';
import tablePage from './tablePage.vue';
import { inject, ref, watch } from 'vue';

const btnlist = ['跟进', '转交', '协同', '完成'];

let items: any = inject('userInfo');
//显示
let check = ref(true);
//全选

//全选
// watch(items.flag, (newval) => {
// 	newval.map((i) => {
// 		i.flag = true;
// 	});
// });
//添加位置
function addColumn() {}
</script>

<style></style>